{{addToMap . "ContentTitle" "用户注册" }}

<div class="alert alert-danger alert-dismissable hide" id="formErrAlarm">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
    <h4><i class="icon fa fa-ban"></i> 数据填写错误</h4>
    请根据提示完善数据信息。
</div>
<div class="box box-info">
    <div class="box-header with-border">
      <h3 class="box-title"></h3>
    </div><!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" method="POST">
      <div class="box-body">
        <div class="form-group">
          <label for="user-username" class="col-sm-4 control-label">用户名</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" name="Username" id="user-username" value="{{.POST.Username}}" placeholder="用户名">
          </div>
        </div>
        <div class="form-group">
          <label for="user-password" class="col-sm-4 control-label">密码</label>
          <div class="col-sm-4">
            <input type="password" class="form-control" name="Password" id="user-password" value="" placeholder="密码">
          </div>
        </div>
        <div class="form-group">
          <label for="user-repassword" class="col-sm-4 control-label">重复密码</label>
          <div class="col-sm-4">
            <input type="password" class="form-control" name="repassword" id="user-repassword" value="" placeholder="重复密码">
          </div>
        </div>
        <div class="form-group">
          <label for="user-name" class="col-sm-4 control-label">姓名</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" name="Name" id="user-name" value="{{.POST.Name}}" placeholder="姓名">
          </div>
        </div>
        <div class="form-group">
          <label for="user-email" class="col-sm-4 control-label">邮箱</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" name="Email" id="user-email" value="{{.POST.Email}}" placeholder="邮箱">
          </div>
        </div>
        <div class="form-group">
          <label for="user-phone" class="col-sm-4 control-label">手机</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" name="Phone" id="user-phone" value="{{.POST.Phone}}" placeholder="手机">
          </div>
        </div>
      </div><!-- /.box-body -->
      <div class="box-footer">
        <button type="submit" class="btn btn-primary center-block">注册</button>
      </div><!-- /.box-footer -->
    </form>
</div>

<script type="text/javascript">
$(function(){
{{if .FormErrs}}
var formErrs = {{.FormErrsJson}};
showFormErrsAndAlarms(formErrs, function(f){
    return $("input[name="+f+"]");
}, function(input, f){
    return input.parent().parent();
});
{{end}}
});
</script>